package com.nancy.java_design.observer.demo1;

/**
 * 测试观察者模式
 */
public class Client {
    public static void main(String[] args) {
        Subject subject = new SubjectObject();

        subject.registerObserver(new WechatObserver("上海海港"));
        subject.registerObserver(new WechatObserver("山东泰山"));

        subject.notifyObservers("足协杯决赛已经完毕，上海海港3:1击败山东泰山，夺冠！");
    }
}
